/* 扫描结果组件样式 */

.problem-overview {
  margin-bottom: 24px;
}

.overview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f0f0f0;
}

/* 严重程度统计卡片 */
.severity-statistics {
  margin-bottom: 24px;
}

.severity-card {
  transition: all 0.3s ease;
  height: 100%;
}

.severity-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}

.severity-icon {
  display: inline-block;
  animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.severity-card .ant-statistic-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #666;
}

.severity-card .ant-statistic-content {
  line-height: 1.2;
}

/* 基础统计信息 */
.basic-statistics {
  margin-bottom: 24px;
}

.analysis-source-card,
.problem-type-card,
.sql-stats-card {
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border: none;
  height: 100%;
  transition: all 0.3s ease;
}

.analysis-source-card:hover,
.problem-type-card:hover,
.sql-stats-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.analysis-source-card .ant-card-head,
.problem-type-card .ant-card-head,
.sql-stats-card .ant-card-head {
  border-bottom: 1px solid #f0f0f0;
  padding: 12px 16px 8px;
  min-height: auto;
}

.analysis-source-card .ant-card-head-title,
.problem-type-card .ant-card-head-title,
.sql-stats-card .ant-card-head-title {
  font-size: 14px;
  font-weight: 600;
  padding: 0;
}

.analysis-source-card .ant-card-body,
.problem-type-card .ant-card-body,
.sql-stats-card .ant-card-body {
  padding: 16px;
}

/* 分析来源统计样式 */
.stat-row {
  display: flex;
  gap: 16px;
  justify-content: space-around;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  padding: 8px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.stat-item:hover {
  background: rgba(24, 144, 255, 0.1);
  transform: translateY(-2px);
}

.stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stat-content {
  flex: 1;
  text-align: center;
}

.stat-value {
  font-size: 18px;
  font-weight: bold;
  color: #262626;
  line-height: 1;
}

.stat-label {
  font-size: 11px;
  color: #666;
  margin-top: 2px;
  font-weight: 500;
}

/* 问题类型统计样式 */
.problem-types {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.problem-type-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 6px;
  transition: all 0.3s ease;
}

.problem-type-item:hover {
  background: rgba(24, 144, 255, 0.1);
  transform: translateX(4px);
}

.problem-type-item .ant-tag {
  margin: 0;
  font-size: 10px;
  padding: 2px 6px;
  min-width: 40px;
  text-align: center;
  border-radius: 4px;
}

.problem-type-item .ant-typography {
  font-size: 13px;
  margin: 0;
  font-weight: 600;
  color: #262626;
}

/* SQL统计样式 */
.sql-statistics {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sql-stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 6px;
}

.sql-stat-item .ant-typography {
  font-size: 12px;
  margin: 0;
  color: #666;
  min-width: 70px;
}

.sql-stat-value {
  font-size: 16px;
  font-weight: bold;
  color: #52c41a;
  min-width: 40px;
  text-align: right;
}

.sql-stat-value.problem {
  color: #ff4d4f;
}

.sql-stat-progress {
  flex: 1;
  margin-left: 12px;
}

.sql-stat-progress .ant-progress {
  margin: 0;
}

.sql-stat-progress .ant-progress-line {
  margin: 0;
}

.sql-stat-progress .ant-progress-text {
  font-size: 11px;
  font-weight: 600;
}

/* Tag 样式优化 */
.problem-overview .ant-tag {
  border-radius: 6px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Progress 组件优化 */
.problem-overview .ant-progress-bg {
  border-radius: 6px;
}

.problem-overview .ant-progress-success-bg,
.problem-overview .ant-progress-bg {
  border-radius: 6px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .basic-statistics .ant-col {
    margin-bottom: 16px;
  }
}

@media (max-width: 768px) {
  .problem-overview {
    margin-bottom: 16px;
  }
  
  .overview-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .severity-statistics {
    margin-bottom: 16px;
  }
  
  .severity-card .ant-statistic-content {
    font-size: 18px;
  }
  
  .severity-icon {
    font-size: 22px !important;
    margin-bottom: 8px;
  }
  
  .stat-row {
    flex-direction: column;
    gap: 8px;
  }
  
  .stat-item {
    justify-content: center;
  }
  
  .stat-value {
    font-size: 16px;
  }
  
  .problem-types {
    gap: 6px;
  }
  
  .problem-type-item {
    padding: 4px 6px;
  }
  
  .sql-stat-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  
  .sql-stat-progress {
    width: 100%;
    margin-left: 0;
    margin-top: 4px;
  }
}

@media (max-width: 576px) {
  .severity-statistics .ant-col {
    span: 12;
  }
  
  .basic-statistics .ant-col {
    span: 24;
  }
  
  .severity-card {
    margin-bottom: 12px;
  }
  
  .stat-icon {
    width: 28px;
    height: 28px;
  }
  
  .stat-value {
    font-size: 14px;
  }
  
  .stat-label {
    font-size: 10px;
  }
}

/* 动画效果 */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.problem-type-item {
  animation: slideInLeft 0.5s ease-out;
}

.problem-type-item:nth-child(1) { animation-delay: 0s; }
.problem-type-item:nth-child(2) { animation-delay: 0.1s; }
.problem-type-item:nth-child(3) { animation-delay: 0.2s; }
.problem-type-item:nth-child(4) { animation-delay: 0.3s; }
.problem-type-item:nth-child(5) { animation-delay: 0.4s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.analysis-source-card,
.problem-type-card,
.sql-stats-card {
  animation: fadeInUp 0.6s ease-out;
}

.analysis-source-card { animation-delay: 0s; }
.problem-type-card { animation-delay: 0.1s; }
.sql-stats-card { animation-delay: 0.2s; }

/* 数值高亮效果 */
.stat-value:hover,
.sql-stat-value:hover {
  color: #1890ff;
  transition: color 0.3s ease;
}

/* 卡片边框动画 */
@keyframes borderGlow {
  0% {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  }
  50% {
    box-shadow: 0 8px 32px rgba(24, 144, 255, 0.2);
  }
  100% {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  }
}

.severity-card:hover {
  animation: borderGlow 2s ease-in-out;
}